SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO


CREATE PROCEDURE dbo.DnnProduct_GetPackageByName
    @PortalID   int,
	@Name		nvarchar(128)
AS
	SELECT *
		FROM   dbo.DnnProduct_Packages
		WHERE  [Name] = @Name 
			AND (PortalID = @PortalID OR @PortalID IS NULL Or PortalID IS Null)
GO
